<%@ page language="java" contentType="text/html;charset=UTF-8"%><%@ include file="../common/common.jsp" %>
<%@ include file="user_pass2.jsp" %>
<%
int pageIndex = ParamUtils.getIntParameter(request, "pageIndex", 1);
int pageSize = 10;

ITopicIlikeService topicIlikeService = (ITopicIlikeService)BeanManager.getBean("topicIlikeService");
int totalrows = topicIlikeService.listCountByUserId(userLogin.getUserId().intValue());

String pageUrl = "user_topic.jsp?";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=SYSTITLE%> - 我订阅的话题</title>
<meta name="Keywords" content="<%=SYSMETAKEY%>" />
<meta name="Description" content="<%=SYSMETADESC%>" />
<%@ include file="../common/meta.inc" %>
<link rel="stylesheet" type="text/css" href="css/defaultStyle.css" >
<script language="javascript" src="${pageContext.request.contextPath}/scripts/common-validator.js"></script>
<script language="javascript" type="text/javascript" src="scripts/showMenu.js"></script>
</head>
<body>
<%@ include file="../common/waiting.inc" %>
<script language="javascript" src="${pageContext.request.contextPath}/scripts/prototype.js"></script>
<script language="javascript" src="${pageContext.request.contextPath}/scripts/buffalo/buffalo.js"></script>
<SCRIPT language="javascript">

setStatus('<%=SYSTITLE%> - 我订阅的话题');

var END_POINT="${pageContext.request.contextPath}/buffalo";
var buffalo = new Buffalo(END_POINT);

function deleteInfo(objs)
{
	if(sl_confirmRemove(objs))
	{
		var ids = getCheckBoxValues(objs);
		buffalo.remoteCall("topicIlikeServiceAjaxService.delete",[ids], function(reply) {
        	ajaxSubmit(reply.getResult(),"删除成功！","reload");		
    	});
	
	}	
}
</SCRIPT>
<script language="javascript" type="text/javascript" src="template/scripts/topBar.js"></script>
<%@ include file="includes/userMenu.inc" %>
<DIV class="line"></DIV>
<DIV class="list_table_0"><%=HtmlConst.navMenu("user_take.jsp","我的工具箱")%>&gt;&gt;我订阅的话题</DIV>
<DIV class="line"></DIV>
<DIV class="list_table_0">
<img src="images/topicPro/new.gif" align="absmiddle" />自您订阅后本主题<strong> 有 </strong>新回复&nbsp;&nbsp;<img src="images/topicPro/old.gif" align="absmiddle" />
自您订阅后本主题<strong> 无 </strong>新回复
</DIV>
<form name="theform" id="theform" method="post" action="">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
<tr align="center" class="tr">
<td width="128" height="25"><strong>来自</strong></td>
<td width="40"><strong>更新</strong></td>
<td><strong>订阅的主题</strong></td>
<td width="100"><strong>作者</strong></td>
<td width="120"><strong>订阅时间</strong></td>
<td width="40"><strong>选择</strong></td>
</tr>
<%List topicList = topicIlikeService.listByUserId(userLogin.getUserId().intValue(),pageIndex,pageSize);	
Map rsMap = null;
for(int i=0;i<topicList.size();i++) {
	rsMap = (Map)topicList.get(i);
%>
<tr class="tab2">
	<td width="128" height="25" align="center">
	<%=Arguments.getClassLink(ParamUtils.getMapToInt(rsMap,"CLASS_ID"),ParamUtils.getMapToString(rsMap,"CLASS_NAME"))%>
	</td>
	<td align="center">
	<%=Arguments.getTopicIlikeDisplay(ParamUtils.getMapToDateTime(rsMap,"LAST_DATETIME"),ParamUtils.getMapToDateTime(rsMap,"TOPIC_LAST_RE_TIME")) %>
	</td>
	<td width="-1">
	<%=Arguments.getTopicLink(ParamUtils.getMapToInt(rsMap,"CLASS_ID"),ParamUtils.getMapToInt(rsMap,"TOPIC_ID"),ParamUtils.getMapToInt(rsMap,"TOPIC_PRO"),ParamUtils.getMapToString(rsMap,"TITLE"),ParamUtils.getMapToString(rsMap,"TOPIC_STYLE_LIST"),ParamUtils.getMapToBoolean(rsMap,"TOPIC_IS_DEL"),100,1) %>
	</td>
	<td align="center">
	<%=Arguments.getUserInfoLink(ParamUtils.getMapToString(rsMap,"LOGIN_ID")) %>
	</td>
	<td align="center">
	<%=HtmlConst.formatDateHtml(ParamUtils.getMapToDateTime(rsMap,"ADD_DATETIME")) %>
	</td>
	<td align="center">
		<input type="checkbox" name="likeId" value="<%=ParamUtils.getMapToInt(rsMap,"LIKE_ID") %>">
	</td>
</tr>
<%} %>	
<tr class="tab2">
	<td height="25" colspan="5" align="right">
	<input name="btnSubmit" type="button" class="btn" value="取消订阅" onclick="deleteInfo(document.theform.likeId);"/>
	全(反)选</td><td align="center">
	<input name="selectAll" type="checkbox" id="selectAll" onclick="selectAllBox(document.theform.likeId);"/>
	</td>
</tr>
</table>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td><%=HtmlConst.pageJump(totalrows,pageSize, pageIndex, pageUrl)%></td></tr></table>
</form>
<%=COPYRIGHTFOOT%>
<%@ include file="../common/foot.inc"%>
</body>
</html>